<?php
session_start();
header('Content-Type: text/html; charset=UTF-8');
require($_SERVER['DOCUMENT_ROOT'] . '/../config/config.inc.php');
include_once( ROOT . 'sdk/saetv2.ex.class.php' );

if(!function_exists('autoload_api'))
{
	function autoload_api($classname)
	{
		global $THRIFT_AUTOLOAD;

		$filename = str_replace('_', '/',$classname) . '.class.php';
		
		$filepath = LIB . $filename;
		
		if(file_exists($filepath)){
			return require($filepath);
		}
		
		$filepath = CONTROLLERS . $filename;
		
		if(file_exists($filepath)){
			return require($filepath);
		}
		
		$filepath = CLS . $filename;
		if(file_exists($filepath)) {
			return require($filepath);
		}
	}
}

spl_autoload_register('autoload_api');

